package com.itheima.case2.controller;

import com.itheima.case2.pojo.po.Role;
import com.itheima.case2.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/role")
public class RoleController {

    @Autowired
    private RoleService service;


    @GetMapping("/query")
    public List find( ){
        List<Role> list = service.findAllRole();
        return list;
    }


}
